Completed
Pull Request — develop (#110)
by Xaver
01:05
created

module.exports   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 29

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 29
rs 8.8571
nop 3

2 Functions

Rating   Name   Duplication   Size   Complexity  
A 0 3 1
A 0 2 1
1
module.exports = function (gulp, plugins, config) {
2
  const browserSync = require('browser-sync');
3
4
  function getTask(task) {
5
    return require('./tasks/' + task)(gulp, plugins, config);
6
  }
7
8
  gulp.task('ws', () =>
9
    browserSync(config.browsersync)
10
  );
11
12
  gulp.task('watch:html', () =>
13
    gulp.watch(config.src.html, gulp.parallel(getTask('html')))
14
  );
15
16
  gulp.task('watch:javascript', () =>
17
    gulp.watch(config.src.javascript, gulp.parallel(getTask('eslint'), getTask('javascript')))
18
  );
19
20
  gulp.task('watch:styles', () =>
21
    gulp.watch(config.src.sass, gulp.parallel(getTask('sasslint'), getTask('sass')))
22
  );
23
24
  gulp.task('watch:json', () =>
25
    gulp.watch(config.src.json, gulp.parallel(getTask('jsonMinify')))
26
  );
27
28
  gulp.task('watch', gulp.parallel('watch:html', 'watch:styles', 'watch:javascript', 'watch:json'));
29
};
30